package com.huawei.gamebox.service.welfare.common.card;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.gamebox.service.common.cardkit.card.BaseGsCard;
import o.cgz;
import o.chy;
import o.dof;
import o.exp.d;

public class GsTitleCard extends BaseGsCard {
    private TextView ˊ;
    private ImageView ॱ;

    public GsTitleCard(Context context) {
        super(context);
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        if (this.ˊᐝ.ॱॱ() != null) {
            this.ˊ.setVisibility(0);
            this.ॱ.setVisibility(0);
            if (!dof.ˋ(this.ˊᐝ.O_())) {
                this.ˊ.setText(this.ˊᐝ.O_());
                return;
            }
            return;
        }
        this.ˊ.setVisibility(4);
        this.ॱ.setVisibility(4);
    }

    public cgz ˏ(View view) {
        ॱ((TextView) view.findViewById(d.ꜞ));
        this.ˊ = (TextView) view.findViewById(d.ᶥ);
        this.ॱ = (ImageView) view.findViewById(d.ㆍ);
        ʽ(view);
        return this;
    }

    public void ॱ(final chy o_chy) {
        OnClickListener anonymousClass1 = new OnClickListener(this) {
            final /* synthetic */ GsTitleCard ˏ;

            public void onClick(View view) {
                if (o_chy != null) {
                    o_chy.ˏ(9, this.ˏ);
                }
            }
        };
        this.ˊ.setOnClickListener(anonymousClass1);
        this.ॱ.setOnClickListener(anonymousClass1);
    }
}
